The present invention relates generally to a graphics display system and in particular to a system and method for filtering graphics data on scanout to a monitor or other display device.
Graphics display devices, such as monitor screens, produce images using an array of small-size picture elements (“pixels”), each having a solid color. The color of each pixel is independently controllable so that an arbitrary image can be produced on the display device. Pixel color is generally determined using a graphics processing system such as system 100 illustrated in FIG. 1. A graphics processor 105 receives image data to be rendered from a source such as a central processing unit (not shown). The image data generally includes position, location, size, and color information for various primitive objects—typically polygons—that make up the image. Graphics processor 105 samples the image data at a number of predetermined sample points (e.g., a point corresponding to the center of each pixel) and determines a color value for each pixel. These color values are stored, one word per pixel, in a frame buffer 110. A display pipe 115 periodically performs a scanout operation on frame buffer 110, reading and transmitting the pixel color values in sequence to a monitor (or other display device) 120.
Graphics processor 105 generally determines pixel color values according to the color of an object in the image that covers each pixel. FIG. 2 illustrates an example image 200 consisting of a polygon 210 of a first color against a background 215 of a different color. For each pixel in the display, including pixels 220a-220z, graphics processor 105 determines whether the pixel is covered by the polygon and stores the appropriate color value in frame buffer 110.
In general, some of pixels 220a-220z will be only partly covered by the polygon, e.g., pixel 220k. Graphics processor 105 includes a mechanism for determining a color for such “edge” pixels. In the simplest such mechanism, one point within each pixel (typically the pixel center) is used; the color of the pixel is determined by whether the center point is inside or outside the polygon boundary. This mechanism, however, leads to “aliasing”—undesired visible jaggedness at the edges of the polygon—due to the abrupt shift from one color to another at the edge pixels.
A more satisfactory solution uses oversampling and filtering to compute pixel color values. A graphics processor oversamples an image by determining the color at two or more sample points for each pixel. The sample points are generally located within (or at the edges or corners of) the pixel. The color value for each pixel is then determined by filtering (or downsampling) the oversampled data, e.g., by computing a weighted or unweighted average of a number of sample values and using the average as the pixel value for display purposes. Generally, for pixels that are completely covered by a solid-colored object, the filtered color value is the same as a single-sample color value. For “edge” pixels, some sample points may be covered by one object while others are covered by another object or by a background color. The filtered color value for an edge pixel is a blend of the respective color values of the sample points. This color blending in the edge pixels reduces visible jaggedness in the displayed image.
FIG. 3 illustrates a conventional graphics processing system 300 for oversampling and filtering. Graphics processor 305 stores oversampled data in an oversampled frame buffer 310, generally via a first frame buffer interface 307. A filter module 315 reads oversampled frame buffer 310 and filters the data to generate one color value per pixel. Each pixel color value is then written to a standard frame buffer 320, generally via a second frame buffer interface 317. If the oversampled frame buffer 310 and standard frame buffer 320 are stored in the same physical memory, then one frame buffer interface is used to access the common memory. During a scanout operation, display pipe 325 reads standard frame buffer 320 and transmits pixel color values to monitor 330.
Oversampling system 300 can reduce aliasing, but it has some drawbacks. For instance, system 300 requires two frame buffers 310, 315 to be provided, each having its own memory interface components 307, 317. Moreover, to display a pixel using system 300 requires at least three memory access operations: one or more read operations on oversampled frame buffer 310 to obtain the sample values for a pixel, a write operation on standard frame buffer 320 to store the filtered pixel value, and a read operation on standard frame buffer 320 to provide the filtered pixel value to the display device. Thus, both the amount of memory and the memory bandwidth required are increased.
Therefore, an improved graphics processing system capable of filtering oversampled data without requiring additional memory or memory access operations would be desirable.